package com.fjwt.gz.service.sms;

import com.alibaba.fastjson2.JSONObject;
import com.fjwt.gz.core.model.SmsConfig;
import com.fjwt.gz.interfaces.ISmsService;
import com.fjwt.gz.service.impl.SysConfigService;
import com.fjwt.gz.zhyx.sms.ALYSmsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class JilinSmsService implements ISmsService {
    @Autowired
    private SysConfigService sysConfigService;
    @Autowired
    private ALYSmsService alySmsService;

    //发送验证码
    @Override
    public void sendSmsCode(String sysType, String phone, String verifyCode, Integer flag) {
        JSONObject smsConfigJson = sysConfigService.selectByGroupKey("smsConfig");
        SmsConfig smsConfig = SmsConfig.parse(smsConfigJson.getString("smsConfigValue"));
        alySmsService.sendSmsCode(sysType, phone, verifyCode, flag,smsConfig);
    }

    @Override
    public Boolean sendMsg(JSONObject jsonObject) {
        return null;
    }



}
